#!/usr/bin/env python3

import pathlib


def dict_reverse(d):
    s = d.read_text()
    s = s.split('\n')
    s.reverse()
    f = d.with_suffix('.reverse.txt')
    f.write_text('\n'.join(s))
